<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/includeSystemSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp" %>
<!-- 右侧楼栋信息 -->
<div id="rightCarareaDiv">
	<form id="baseCarareaForm" method="POST" onsubmit="return false;">
	
	<div class="widget-main customBtn">	
	
	 <c:forEach var="btn" items="${permitBtn}">
        <c:choose>
			<c:when test="${btn.permission=='estate:projectBuilding:edit'}">
				<button type="button" id="${industDatas.id}" onclick="createIndustModel(this,${ar.obj.projectId},${ar.obj.premisesId},${ar.obj.id},true,2)" class="btn btn-warning  btn-sm">
					<span class="glyphicon glyphicon-search">编辑</span>
				</button>
				&emsp;
			</c:when>
			<c:when test="${btn.permission=='estate:import:importExcel'}">
				<button type="button" id="btn_importCararea" class="btn btn-primary btn-sm">
					<span class="glyphicon glyphicon-edit">导入车位</span>
				</button>
				&emsp;
			</c:when>
			<c:when test="${btn.permission=='estate:projectBuilding:delete'}">
				<button type="button" id="btn_buildingDel" class="btn btn-primary btn-sm">
					<span class="glyphicon glyphicon-minus">删除</span>
				</button>
			</c:when>
		</c:choose>
	</c:forEach>
	
	</div>
	<c:if test="${!empty ar.obj}">
	<input type="hidden" id="projectId" value="${ar.obj.projectId}">
	<input type='hidden' name='buildingId' value="${ar.obj.id}" />
	</c:if>
	<c:if test="${!empty parentName}">
	<input type='hidden' name='parentName' value="${parentName}" />
	</c:if>
	<c:if test="${!empty manageObject}">
	<input type='hidden' name='manageObject' value="${manageObject}" />
	</c:if>
	</form>
	<c:choose>
	<c:when test="${!empty ar.obj}">
	<table id="buildingTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;">车区详情</td>
		</tr>
		<tr>
			<td><b>管理对象&emsp;&emsp;&emsp;</b>&emsp;&emsp;${manageObject}</td>
		</tr>
		<tr>
			<td><b>车区名称&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.buildingName}</td>
		</tr>
		<tr>
			<td><b>车区编号&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.buildingCode}</td>
		</tr>
<!-- 		<tr> -->
<!-- 			<td><b>交付情况&emsp;&emsp;&emsp;</b>&emsp;&emsp; -->
<%-- 			<c:if test="${ar.obj.deliveryFlag==0}"> --%>
<!-- 				未交付 -->
<%-- 			</c:if> --%>
<%-- 			<c:if test="${ar.obj.deliveryFlag==1}"> --%>
<!-- 				已交付 -->
<%-- 			</c:if> --%>
<!-- 			</td> -->
<!-- 		</tr> -->
<!-- 		<tr> -->
<%-- 			<td><b>交付日期&emsp;&emsp;&emsp;</b>&emsp;&emsp;<fmt:formatDate value="${ar.obj.deliveryDate}" pattern="yyyy-MM-dd"/></td> --%>
<!-- 		</tr> -->
<!-- 		<tr> -->
<!-- 			<td><b>装修标准&emsp;&emsp;&emsp;</b> -->
<%-- 				&emsp;&emsp;<c:choose> --%>
<%-- 				<c:when test="${ar.obj.renovationType eq 0}">精装</c:when> --%>
<%-- 				<c:when test="${ar.obj.renovationType eq 1}">毛坯</c:when> --%>
<%-- 				<c:when test="${ar.obj.renovationType eq 2}">其他${ar.obj.renovationDesc}</c:when> --%>
<%-- 				</c:choose> --%>
<!-- 			</td> -->
<!-- 		</tr> -->
<!-- 		<tr> -->
<%-- 			<td><b>开盘日期&emsp;&emsp;&emsp;</b>&emsp;&emsp;<fmt:formatDate value="${ar.obj.openTime}" pattern="yyyy-MM-dd"/></td> --%>
<!-- 		</tr> -->
<!-- 		<tr> -->
<%-- 			<td><b>默认定金&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.defaultEarnest}</td> --%>
<!-- 		</tr> -->
<!-- 		<tr> -->
<%-- 			<td><b>预售证编号&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.salesPermissionNo}</td> --%>
<!-- 		</tr> -->
<!-- 		<tr> -->
<%-- 			<td><b>预售证领取日期</b>&emsp;&emsp;<fmt:formatDate value="${ar.obj.salesPermissionDate}" pattern="yyyy-MM-dd"/></td> --%>
<!-- 		</tr> -->
		<tr>
			<td><b>业态标识:&emsp;&emsp;</b>&emsp;&emsp;${industDatas.industMark}</td>
		</tr>
		
		<tr>
			<td><b>自持面积&emsp;&emsp;&emsp;</b>&emsp;&emsp;${industDatas.selfSustaiAcreag}</td>
		</tr>
		
		<%-- <tr>
			<td><b>栋数&emsp;&emsp;&emsp;</b>&emsp;&emsp;${industDatas.numberOfBuildi}</td>
		</tr>
		
		<tr>
			<td><b>层数&emsp;&emsp;&emsp;</b>&emsp;&emsp;${industDatas.numberLayers}</td>
		</tr>
		<tr>
			<td><b>总户数&emsp;&emsp;&emsp;</b>&emsp;&emsp;${industDatas.totalHouse}</td>
		</tr>
		--%>
		<tr> 
			<td><b>可售车位</b>&emsp;&emsp;
			
			 <fmt:formatNumber  value="${industDatas.salableAcreag}" pattern="#.0" minFractionDigits="0" ></fmt:formatNumber> 
			
			</td>
		</tr>
		
		<%-- <tr>
			<td><b>地上可售面积</b>&emsp;&emsp;${industDatas.groundSalesAcreag}</td>
		</tr>
		
		<tr>
			<td><b>地下可售面积</b>&emsp;&emsp;${industDatas.undergSalesAcreag}</td>
		</tr> --%>
		
		
		<tr>
			<td><b>自持货值</b>&emsp;&emsp;${industDatas.targetValue}</td>
		</tr>
		 
			<c:forEach items="${versionList}" var="item">
		
		<tr>
			<td>
			<b style="color: red;">${item.versionName}&emsp;&emsp;&emsp;</b>&emsp;&emsp;
			
			</td>
		</tr>
		<tr>
			<td>
			<b>生效时间</b>&emsp;&emsp;<fmt:formatDate value="${item.effectStartTime}" pattern="yyyy-MM-dd"/>
			<b>目标销售均价</b>&emsp;&emsp;${item.versionValue}
			</td>
		</tr>
		</c:forEach>
		<tr>
			<td><b>备&emsp;&emsp;注&emsp;&emsp;&emsp;</b>&emsp;&emsp;${ar.obj.remark}</td>
		</tr>
	</table>
	</c:when>
	<c:otherwise>
	<table id="buildingTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;">车区详情</td>
		</tr>
		<tr>
			<td style="text-align: center;"><h1>${ar.resMsg}</h1></td>
		</tr>
	</table>
	</c:otherwise>
	</c:choose>
</div>
<%-- <script src="${jypath}/static/js/estate/cararea/cararea_new.js?v=${jsVersion}"></script> --%>